<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="Learn.Web.MVC.Code.ProductViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <form id="form1" runat="server">

    <h2>Index
    </h2>
    <% =Html.TextBox("t1")%>
    
    
     <%=Html.Encode(ViewData["products"])%><br />
    <asp:Repeater ID="Repeater1" DataSource='<%#ViewData["products"]%>' runat="server">
        <ItemTemplate>
            Name:<%#Eval("Name")%><br />
        </ItemTemplate>
    </asp:Repeater>
 <%foreach (var item in (List<Learn.Web.MVC.Models.ProductInfoModel>)ViewData["products"])
   {%>
          [Name]: <%=item.Name%><br/>
      <%} %>

    </form>


</asp:Content>
